Relating Typability and Expressiveness in Finite-Rank Intersection Type Systems
نویسندگان
چکیده
We investigate finite-rank intersection type systems, analyzing the complexity of their type inference problems and their relation to the problem of recognizing semantically equivalent terms. Intersection types allow something of type τ1 ∧ τ2 to be used in some places at type τ1 and in other places at type τ2. A finite-rank intersection type system bounds how deeply the ∧ can appear in type expressions. Such type systems enjoy strong normalization, subject reduction, and computable type inference, and they support a pragmatics for implementing parametric polymorphism. As a consequence, they provide a conceptually simple and tractable alternative to the impredicative polymorphism of System F and its extensions, while typing many more programs than the Hindley-Milner type system found in ML and Haskell. While type inference is computable at every rank, we show that its complexity grows exponentially as rank increases. Let K(0, n) = n and K(t + 1, n) = 2; we prove that recognizing the pure λ-terms of size n that are typable at rank k is complete for dtime[K(k−1, n)]. We then consider the problem of deciding whether two λ-terms typable at rank k have the same normal form, Supported by NATO grant CRG 971607, NSF grant CCR– 9417382, and NSF grant EIA–9806747. Supported by ONR Grant N00014-93-1-1015, NSF Grant CCR-9619638, and the Tyson Foundation. Supported by NSF grant EIA–9806747. Supported by EPSRC grant GR/L 36963, and NSF grant
منابع مشابه
Rank 2 Type Systems and Recursive Deenitions Technical Memorandum Mittlcsstmm531
We demonstrate an equivalence between the rank 2 fragments of the polymorphic lambda calculus (System F) and the intersection type discipline: exactly the same terms are typable in each system. An immediate consequence is that typability in the rank 2 intersection system is DEXPTIME-complete. We introduce a rank 2 system combining intersections and polymorphism, and prove that it types exactly ...
متن کاملStrong Normalization and Typability with Intersection Types
A simple proof is given of the property that the set of strongly normalizing lambda terms coincides with the set of lambda terms typable in certain intersection type assignment systems.
متن کاملRank 3 Inhabitation of Intersection Types Revisited (Extended Version)
We revisit the undecidability result of rank 3 intersection type inhabitation (Urzyczyn 2009) in pursuit of two goals. First, we strengthen the previous result by showing that intersection type inhabitation is undecidable for types of rank 3 and order 3, i.e. it is not necessary to introduce new functional dependencies (new instructions) during proof search. Second, we pinpoint the principles n...
متن کاملSOME RESULTS ON THE COMPLEMENT OF THE INTERSECTION GRAPH OF SUBGROUPS OF A FINITE GROUP
Let G be a group. Recall that the intersection graph of subgroups of G is an undirected graph whose vertex set is the set of all nontrivial subgroups of G and distinct vertices H,K are joined by an edge in this graph if and only if the intersection of H and K is nontrivial. The aim of this article is to investigate the interplay between the group-theoretic properties of a finite group G and the...
متن کاملA Direct Algorithm for Type Inference in the Rank 2 Fragment of the Second-Order -Calculus
We study the problem of type inference for a family of polymorphic type disciplines containing the power of Core-ML. This family comprises all levels of the strati cation of the second-order lambda-calculus by \rank" of types. We show that typability is an undecidable problem at every rank k 3 of this strati cation. While it was already known that typability is decidable at rank 2, no direct an...
متن کامل